﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HRM.DAL.DAO;
using HRM.DBGatway;

namespace HRM.BLL
{
    public class ProjectManager
    {
        ProjectGateway gateway = new ProjectGateway();
        public string SaveProject(Project project)
        {
            if (gateway.HasThisProjectAllreadyExist(project))
            {
                return "The Project Already Exist in the System";
            }
            else
            {
                return gateway.SaveProject(project);
            }
        }

        public string UpdateProject(Project project)
        {
            return gateway.UpdateProject(project);
        }

        public List<Project> GetAllProjects()
        {
            return gateway.GetAllProjects();
        }

        public string DeleteProjects(int id)
        {
            return gateway.DeleteProject(id);
        }
    }
}